package com.ty.day6;

import java.util.Arrays;

import static com.ty.day1.Task2.isPrime;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/13 14:09
 */
public class Three {
    public static void main(String[] args) {
        int[] a = new int[0];
        for (int i = 100; i < 300; i++) {
            if (isPrime(i)){
                a= Arrays.copyOf(a, a.length+1);
                a[a.length-1]=i;
            }
        }
        System.out.println(Arrays.toString(a));
    }
}
